package org.lq.shopping.entity;

import java.io.Serializable;

/**
 *  购物车表
 * @崔晏铭 77496
 *	@date 2018年9月26日
 */
public class Shop_car implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 888187870703443710L;
	private int	user_id;// 用户id
	private int	goods_id; // 商品id
	private Double	price;	// 单价
	private int	count;   //数量
	private int	total_price; // 小计
	public int getUser_id() {
		return user_id;
	}
	public void setUser_id(int user_id) {
		this.user_id = user_id;
	}
	public int getGoods_id() {
		return goods_id;
	}
	public void setGoods_id(int goods_id) {
		this.goods_id = goods_id;
	}
	public Double getPrice() {
		return price;
	}
	public void setPrice(Double price) {
		this.price = price;
	}
	public int getCount() {
		return count;
	}
	public void setCount(int count) {
		this.count = count;
	}
	public int getTotal_price() {
		return total_price;
	}
	public void setTotal_price(int total_price) {
		this.total_price = total_price;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + count;
		result = prime * result + goods_id;
		result = prime * result + ((price == null) ? 0 : price.hashCode());
		result = prime * result + total_price;
		result = prime * result + user_id;
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Shop_car other = (Shop_car) obj;
		if (count != other.count)
			return false;
		if (goods_id != other.goods_id)
			return false;
		if (price == null) {
			if (other.price != null)
				return false;
		} else if (!price.equals(other.price))
			return false;
		if (total_price != other.total_price)
			return false;
		if (user_id != other.user_id)
			return false;
		return true;
	}
	@Override
	public String toString() {
		return "Shop_car [user_id=" + user_id + ", goods_id=" + goods_id + ", price=" + price + ", count=" + count
				+ ", total_price=" + total_price + "]";
	}
	public Shop_car() {
		super();
		// TODO Auto-generated constructor stub
	}
	
	
}
